Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add previous method #313

Merged
merged 6 commits into from
Dec 15, 2023
Merged

Add previous method #313

merged 6 commits into from
Dec 15, 2023

Conversation

zerobias
Copy link
Member

@zerobias zerobias commented Dec 14, 2023

Description

Checklist for a new method

  • Create a directory for the new method in the src directory in param-case
  • Place the source code to src/method-name/index.ts in ESModules export in camelCase named export
  • Add tests to src/method-name/method-name.test.ts
  • Add fork tests to src/method-name/method-name.fork.test.ts
  • Add type tests to test-typings/method-name.ts
    • Use // @ts-expect-error to mark expected type error
    • import { expectType } from 'tsd' to check expected return type
  • Add documentation in src/method-name/readme.md
    • Add header Patronum/MethodName
    • Add section with overloads, if have
    • Add Motivation, Formulae, Arguments and Return sections for each overload
    • Add useful examples in Example section for each overload
  • Add section to README.md in the repository root
    • Add method to the table of contents into correct category - [MethodName](#methodname) - description.
    • Add section ## MethodName
    • Add [Method documentation & API](/src/method-name) into section
    • Add simple example

@zerobias zerobias marked this pull request as ready for review December 14, 2023 18:51
@zerobias zerobias changed the base branch from main to release/v2.1 December 14, 2023 19:14
sergeysova
sergeysova previously approved these changes Dec 14, 2023
@sergeysova sergeysova added the feature New functionality label Dec 14, 2023
@zerobias zerobias changed the title Add previousValue method Add previous method Dec 15, 2023
@zerobias zerobias merged commit 4a0e139 into release/v2.1 Dec 15, 2023
5 checks passed
@zerobias zerobias deleted the add-prevValue-method branch December 15, 2023 11:18
zerobias added a commit that referenced this pull request Dec 15, 2023
* Update homepage in package.json and npm website

* Add previous method (#313)

* Add previousValue method

* Add support for undefined

* Add store validation

* Add type tests

* Add `previousValue` to documentation root

* Rename `previousValue` to `previous`

* Add shorthands for common methods (#315)

* Add `debounce(source, timeout)` shorthand

* Add `delay(source, timeout)`

* Add `throttle(source, timeout)` shorthand

* add `status(fx)` shorthand

* Add `pending(effects)` shorthand

* Add `inFlight(effects)` shorthand

* Add `combineEvents(events)` shorthand

* Add `spread(targets)` shorthand

* Add `time(clock)` shorthand

* Update sids in snapshots
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants